<script setup lang="ts">
import workerChoose from '@/components/workerChoose/workerChoose.vue'
import { onActivated, onDeactivated, ref } from 'vue'
import { appStore } from '@/stores/appStore/appStore'
const app = appStore()
let curProviderId = ''
const worker = ref()
onActivated(() => {
    if (!app.svcProviderId || app.svcProviderId !== curProviderId) {
        worker.value.loadData()
    }
})
onDeactivated(() => {
    curProviderId = app.svcProviderId
})

</script>
<template> 
    <div class="worker">
        <workerChoose ref="worker" />
    </div>
</template>
<style>
.worker {
    height: calc(100vh - 46px);
}
</style>